package com.huitu.whht.base.core.api.wq.aaacp;

import com.huitu.api.rest.AbstractApiResource;
import com.huitu.commons.PageUtils;
import com.huitu.whht.api.core.common.response.ApiResultBuilder;
import com.huitu.whht.api.core.common.annotations.SzyCoreApiResource;
import com.huitu.whht.api.core.common.annotations.SzyCoreApiService;
import com.huitu.whht.api.core.common.response.StatusRespBuilder;
import com.huitu.whht.api.core.common.util.LocalDateTimeUtil;
import java.time.LocalDateTime;
import com.huitu.whht.base.core.api.wq.aaacp.entities.WqAaacpD;
import com.huitu.whht.base.core.api.wq.aaacp.entities.WqAaacpDKey;
import com.huitu.whht.base.core.api.wq.aaacp.entities.WqAaacpDQo;
import com.huitu.whht.base.core.api.wq.aaacp.service.IWqAaacpDService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;

import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

/**
 * 说明: 测站卤代烷醛胺类有机物项目数据表API,表名称: WQ_AAACP_D <br/>
 * 日期: 2019-04-11
 * @author LiuCW
 */
@Component
@SzyCoreApiResource
@Path("wq/aaacp/d")
public class WqAaacpDResource extends AbstractApiResource {

    private static final Logger LOGGER = LoggerFactory.getLogger(WqAaacpDResource.class);

    private static final String UUID = "1b7ed92a-c787-4938-a0cb-4ec294aee1ab";

    @Override
    public String getUUID() {
        return UUID;
    }

    @Autowired
    @SzyCoreApiService
    IWqAaacpDService wqAaacpDService;

    /**
     * @api {get} wq/aaacp/d/{stcd:\\w{8}}/{spt}/{prpnm:\\w{1}}/{lynm:\\w{1}}/{wbtp:\\w{1}} [R][G]根据主键查询
     * @apiDescription [G]根据主键查询WQ_AAACP_D(测站卤代烷醛胺类有机物项目数据表)数据
     * @apiName (generate)select by primary key
     * @apiGroup WQ_AAACP_D-测站卤代烷醛胺类有机物项目数据表
     * @apiVersion 1.0.0
     * @apiSampleRequest wq/aaacp/d/{stcd}/{spt}/{prpnm}/{lynm}/{wbtp}
     * @apiParam   {String}         stcd               【必须】测站编码
     * @apiParam   {Date}           spt                【必须】采样时间
     * @apiParam   {String}         prpnm              【必须】垂线编号
     * @apiParam   {String}         lynm               【必须】层面编号
     * @apiParam   {String}         wbtp               【必须】水体类型
     * @apiSuccess {String}         stcd               测站编码
     * @apiSuccess {String}         prpnm              垂线编号
     * @apiSuccess {String}         lynm               层面编号
     * @apiSuccess {String}         wbtp               水体类型
     * @apiSuccess {Date}           spt                采样时间(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiSuccess {Double}         erljw              二氯甲烷
     * @apiSuccess {Double}         sljw               三氯甲烷
     * @apiSuccess {Double}         silht              四氯化碳
     * @apiSuccess {Double}         sxjw               三溴甲烷
     * @apiSuccess {Double}         erlyw12            1，2二氯乙烷
     * @apiSuccess {Double}         hylbw              环氧氯丙烷
     * @apiSuccess {Double}         hyql               环氧七氯
     * @apiSuccess {Double}         lyx                氯乙烯
     * @apiSuccess {Double}         erlyx11            1，1二氯乙烯
     * @apiSuccess {Double}         erlyx12            1，2二氯乙烯
     * @apiSuccess {Double}         slyx               三氯乙烯
     * @apiSuccess {Double}         silyx              四氯乙烯
     * @apiSuccess {Double}         lderx              氯丁二烯
     * @apiSuccess {Double}         llderx             六氯丁二烯
     * @apiSuccess {Double}         jq                 甲醛
     * @apiSuccess {Double}         yq                 乙醛
     * @apiSuccess {Double}         slyq               三氯乙醛
     * @apiSuccess {Double}         bxq                丙烯醛
     * @apiSuccess {Double}         bxxan              丙烯酰胺
     * @apiSuccess {Double}         bxqi               丙烯腈
     * @apiSuccess {String}         nt                 备注
     * @apiSuccess {String}         speRegData         特殊区域
     * @apiSuccess {Date}           ts                 时间戳(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiSuccess {Date}           testComTm          化验完成时间(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiSuccessExample 请求成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "stcd": null,
     * "prpnm": null,
     * "lynm": null,
     * "wbtp": null,
     * "spt": null,
     * "erljw": null,
     * "sljw": null,
     * "silht": null,
     * "sxjw": null,
     * "erlyw12": null,
     * "hylbw": null,
     * "hyql": null,
     * "lyx": null,
     * "erlyx11": null,
     * "erlyx12": null,
     * "slyx": null,
     * "silyx": null,
     * "lderx": null,
     * "llderx": null,
     * "jq": null,
     * "yq": null,
     * "slyq": null,
     * "bxq": null,
     * "bxxan": null,
     * "bxqi": null,
     * "nt": null,
     * "speRegData": null,
     * "ts": null,
     * "testComTm": null
     *  }
     * }
     * @apiUse exceptions
     */
    @GET
    @Path("{stcd:\\w{8}}/{spt}/{prpnm:\\w{1}}/{lynm:\\w{1}}/{wbtp:\\w{1}}")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response selectByPrimaryKey(@PathParam("stcd") String stcd,@PathParam("spt") String spt,@PathParam("prpnm") String prpnm,@PathParam("lynm") String lynm,@PathParam("wbtp") String wbtp) {
        WqAaacpDKey pk = new WqAaacpDKey();
        pk.setStcd(stcd);
        LocalDateTime.parse(spt,LocalDateTimeUtil.DATE_TIME_FORMATTER_YMD_HMS);
        pk.setPrpnm(prpnm);
        pk.setLynm(lynm);
        pk.setWbtp(wbtp);
        LOGGER.info("根据主键查询 测站卤代烷醛胺类有机物项目数据表,参数 pk:{}", pk);
        return Response.ok(ApiResultBuilder.create(this, wqAaacpDService.selectByPrimaryKey(pk))).build();
    }

    /**
     * @api {post} wq/aaacp/d/list [R][G]根据条件查询
     * @apiDescription [G]根据条件查询WQ_AAACP_D(测站卤代烷醛胺类有机物项目数据表)数据
     * @apiName (generate)select by filter
     * @apiGroup WQ_AAACP_D-测站卤代烷醛胺类有机物项目数据表
     * @apiVersion 1.0.0
     * @apiSampleRequest wq/aaacp/d/list
     * @apiParam   {String}         stcd               测站编码
     * @apiParam   {List(String)}   prpnmList          (数组)垂线编号
     * @apiParam   {List(String)}   lynmList           (数组)层面编号
     * @apiParam   {List(String)}   wbtpList           (数组)水体类型
     * @apiParam   {Date}           sptBgTm            (开始时间)采样时间
     * @apiParam   {Date}           sptEdTm            (结束时间)采样时间
     * @apiParam   {Double}         erljwMin           (最小)二氯甲烷
     * @apiParam   {Double}         erljwMax           (最大)二氯甲烷
     * @apiParam   {Double}         sljwMin            (最小)三氯甲烷
     * @apiParam   {Double}         sljwMax            (最大)三氯甲烷
     * @apiParam   {Double}         silhtMin           (最小)四氯化碳
     * @apiParam   {Double}         silhtMax           (最大)四氯化碳
     * @apiParam   {Double}         sxjwMin            (最小)三溴甲烷
     * @apiParam   {Double}         sxjwMax            (最大)三溴甲烷
     * @apiParam   {Double}         erlyw12Min         (最小)1，2二氯乙烷
     * @apiParam   {Double}         erlyw12Max         (最大)1，2二氯乙烷
     * @apiParam   {Double}         hylbwMin           (最小)环氧氯丙烷
     * @apiParam   {Double}         hylbwMax           (最大)环氧氯丙烷
     * @apiParam   {Double}         hyqlMin            (最小)环氧七氯
     * @apiParam   {Double}         hyqlMax            (最大)环氧七氯
     * @apiParam   {Double}         lyxMin             (最小)氯乙烯
     * @apiParam   {Double}         lyxMax             (最大)氯乙烯
     * @apiParam   {Double}         erlyx11Min         (最小)1，1二氯乙烯
     * @apiParam   {Double}         erlyx11Max         (最大)1，1二氯乙烯
     * @apiParam   {Double}         erlyx12Min         (最小)1，2二氯乙烯
     * @apiParam   {Double}         erlyx12Max         (最大)1，2二氯乙烯
     * @apiParam   {Double}         slyxMin            (最小)三氯乙烯
     * @apiParam   {Double}         slyxMax            (最大)三氯乙烯
     * @apiParam   {Double}         silyxMin           (最小)四氯乙烯
     * @apiParam   {Double}         silyxMax           (最大)四氯乙烯
     * @apiParam   {Double}         lderxMin           (最小)氯丁二烯
     * @apiParam   {Double}         lderxMax           (最大)氯丁二烯
     * @apiParam   {Double}         llderxMin          (最小)六氯丁二烯
     * @apiParam   {Double}         llderxMax          (最大)六氯丁二烯
     * @apiParam   {Double}         jqMin              (最小)甲醛
     * @apiParam   {Double}         jqMax              (最大)甲醛
     * @apiParam   {Double}         yqMin              (最小)乙醛
     * @apiParam   {Double}         yqMax              (最大)乙醛
     * @apiParam   {Double}         slyqMin            (最小)三氯乙醛
     * @apiParam   {Double}         slyqMax            (最大)三氯乙醛
     * @apiParam   {Double}         bxqMin             (最小)丙烯醛
     * @apiParam   {Double}         bxqMax             (最大)丙烯醛
     * @apiParam   {Double}         bxxanMin           (最小)丙烯酰胺
     * @apiParam   {Double}         bxxanMax           (最大)丙烯酰胺
     * @apiParam   {Double}         bxqiMin            (最小)丙烯腈
     * @apiParam   {Double}         bxqiMax            (最大)丙烯腈
     * @apiParam   {String}         nt                 备注
     * @apiParam   {List(String)}   speRegDataList     (数组)特殊区域
     * @apiParam   {Date}           tsBgTm             (开始时间)时间戳
     * @apiParam   {Date}           tsEdTm             (结束时间)时间戳
     * @apiParam   {Date}           testComTmBgTm      (开始时间)化验完成时间
     * @apiParam   {Date}           testComTmEdTm      (结束时间)化验完成时间
     * @apiSuccess {String}         stcd               测站编码
     * @apiSuccess {String}         prpnm              垂线编号
     * @apiSuccess {String}         lynm               层面编号
     * @apiSuccess {String}         wbtp               水体类型
     * @apiSuccess {Date}           spt                采样时间
     * @apiSuccess {Double}         erljw              二氯甲烷
     * @apiSuccess {Double}         sljw               三氯甲烷
     * @apiSuccess {Double}         silht              四氯化碳
     * @apiSuccess {Double}         sxjw               三溴甲烷
     * @apiSuccess {Double}         erlyw12            1，2二氯乙烷
     * @apiSuccess {Double}         hylbw              环氧氯丙烷
     * @apiSuccess {Double}         hyql               环氧七氯
     * @apiSuccess {Double}         lyx                氯乙烯
     * @apiSuccess {Double}         erlyx11            1，1二氯乙烯
     * @apiSuccess {Double}         erlyx12            1，2二氯乙烯
     * @apiSuccess {Double}         slyx               三氯乙烯
     * @apiSuccess {Double}         silyx              四氯乙烯
     * @apiSuccess {Double}         lderx              氯丁二烯
     * @apiSuccess {Double}         llderx             六氯丁二烯
     * @apiSuccess {Double}         jq                 甲醛
     * @apiSuccess {Double}         yq                 乙醛
     * @apiSuccess {Double}         slyq               三氯乙醛
     * @apiSuccess {Double}         bxq                丙烯醛
     * @apiSuccess {Double}         bxxan              丙烯酰胺
     * @apiSuccess {Double}         bxqi               丙烯腈
     * @apiSuccess {String}         nt                 备注
     * @apiSuccess {String}         speRegData         特殊区域
     * @apiSuccess {Date}           ts                 时间戳
     * @apiSuccess {Date}           testComTm          化验完成时间
     * @apiSuccessExample 请求成功:
     * HTTP/1.1 200 OK
     * {
     * "result": [{
     * "stcd": null,
     * "prpnm": null,
     * "lynm": null,
     * "wbtp": null,
     * "spt": null,
     * "erljw": null,
     * "sljw": null,
     * "silht": null,
     * "sxjw": null,
     * "erlyw12": null,
     * "hylbw": null,
     * "hyql": null,
     * "lyx": null,
     * "erlyx11": null,
     * "erlyx12": null,
     * "slyx": null,
     * "silyx": null,
     * "lderx": null,
     * "llderx": null,
     * "jq": null,
     * "yq": null,
     * "slyq": null,
     * "bxq": null,
     * "bxxan": null,
     * "bxqi": null,
     * "nt": null,
     * "speRegData": null,
     * "ts": null,
     * "testComTm": null
     *  }]
     * }
     *
     * @apiSuccessExample 分页请求:
     * request header: Rang={max=50;size=50;field=TS DESC}
     * HTTP/1.1 200 OK
     * {
     * "result": [{
     * "stcd": null,
     * "prpnm": null,
     * "lynm": null,
     * "wbtp": null,
     * "spt": null,
     * "erljw": null,
     * "sljw": null,
     * "silht": null,
     * "sxjw": null,
     * "erlyw12": null,
     * "hylbw": null,
     * "hyql": null,
     * "lyx": null,
     * "erlyx11": null,
     * "erlyx12": null,
     * "slyx": null,
     * "silyx": null,
     * "lderx": null,
     * "llderx": null,
     * "jq": null,
     * "yq": null,
     * "slyq": null,
     * "bxq": null,
     * "bxxan": null,
     * "bxqi": null,
     * "nt": null,
     * "speRegData": null,
     * "ts": null,
     * "testComTm": null
     *  }],
     * "paging": {
     * "count": 3,
     * "total": 120,
     * "finale": false,
     * "index": 1
     * }
     * }
     * @apiUse header_rang
     * @apiUse exceptions
     */
    @POST
    @Path("list")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response selectList(WqAaacpDQo filter) {
        PageUtils.startPageFromRang();
        LOGGER.info("根据条件查询 测站卤代烷醛胺类有机物项目数据表,参数 WqAaacpDQo:{}", filter);
        return Response.ok(ApiResultBuilder.create(this, wqAaacpDService.selectList(filter))).build();
    }

    /**
     * @api {put} wq/aaacp/d [C][G]新增数据
     * @apiPrivate
     * @apiDescription [G]新增WQ_AAACP_D(测站卤代烷醛胺类有机物项目数据表)数据
     * @apiName (generate)add data
     * @apiGroup WQ_AAACP_D-测站卤代烷醛胺类有机物项目数据表
     * @apiVersion 1.0.0
     * @apiParam   {String}         stcd               【必须】测站编码
     * @apiParam   {String}         prpnm              【必须】垂线编号
     * @apiParam   {String}         lynm               【必须】层面编号
     * @apiParam   {String}         wbtp               【必须】水体类型
     * @apiParam   {Date}           spt                【必须】采样时间(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiParam   {Double}         erljw              二氯甲烷
     * @apiParam   {Double}         sljw               三氯甲烷
     * @apiParam   {Double}         silht              四氯化碳
     * @apiParam   {Double}         sxjw               三溴甲烷
     * @apiParam   {Double}         erlyw12            1，2二氯乙烷
     * @apiParam   {Double}         hylbw              环氧氯丙烷
     * @apiParam   {Double}         hyql               环氧七氯
     * @apiParam   {Double}         lyx                氯乙烯
     * @apiParam   {Double}         erlyx11            1，1二氯乙烯
     * @apiParam   {Double}         erlyx12            1，2二氯乙烯
     * @apiParam   {Double}         slyx               三氯乙烯
     * @apiParam   {Double}         silyx              四氯乙烯
     * @apiParam   {Double}         lderx              氯丁二烯
     * @apiParam   {Double}         llderx             六氯丁二烯
     * @apiParam   {Double}         jq                 甲醛
     * @apiParam   {Double}         yq                 乙醛
     * @apiParam   {Double}         slyq               三氯乙醛
     * @apiParam   {Double}         bxq                丙烯醛
     * @apiParam   {Double}         bxxan              丙烯酰胺
     * @apiParam   {Double}         bxqi               丙烯腈
     * @apiParam   {String}         nt                 备注
     * @apiParam   {String}         speRegData         特殊区域
     * @apiParam   {Date}           ts                 时间戳(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiParam   {Date}           testComTm          化验完成时间(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiSuccess {Integer}        status             1:新增成功;0:新增失败.
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据,通常包含新增数据的主键值
     * @apiSampleRequest wq/aaacp/d
     * @apiSuccessExample 新增成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":{
     *   "stcd": null,
     *   "spt": null,
     *   "prpnm": null,
     *   "lynm": null,
     *   "wbtp": null
     *      }
     *   }
     * }
     @apiSuccessExample 新增失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":{
     *   "stcd": null,
     *   "spt": null,
     *   "prpnm": null,
     *   "lynm": null,
     *   "wbtp": null
     *      }
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * {
     * "stcd": null,
     * "prpnm": null,
     * "lynm": null,
     * "wbtp": null,
     * "spt": null,
     * "erljw": null,
     * "sljw": null,
     * "silht": null,
     * "sxjw": null,
     * "erlyw12": null,
     * "hylbw": null,
     * "hyql": null,
     * "lyx": null,
     * "erlyx11": null,
     * "erlyx12": null,
     * "slyx": null,
     * "silyx": null,
     * "lderx": null,
     * "llderx": null,
     * "jq": null,
     * "yq": null,
     * "slyq": null,
     * "bxq": null,
     * "bxxan": null,
     * "bxqi": null,
     * "nt": null,
     * "speRegData": null,
     * "ts": null,
     * "testComTm": null
     * }
     * @apiUse exceptions
     */
    @PUT
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response insert(WqAaacpD record) {
        LOGGER.info("新增 测站卤代烷醛胺类有机物项目数据表,参数 WqAaacpD:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.insert(wqAaacpDService.insertSelective(record),record))).build();
    }

    /**
     * @api {post} wq/aaacp/d/insertBatch [C][G]批量新增数据
     * @apiPrivate
     * @apiDescription [G]批量新增WQ_AAACP_D(测站卤代烷醛胺类有机物项目数据表)数据
     * @apiName (generate)addBatch data
     * @apiGroup WQ_AAACP_D-测站卤代烷醛胺类有机物项目数据表
     * @apiVersion 1.0.0
     * @apiParam   {String}         stcd               【必须】测站编码
     * @apiParam   {String}         prpnm              【必须】垂线编号
     * @apiParam   {String}         lynm               【必须】层面编号
     * @apiParam   {String}         wbtp               【必须】水体类型
     * @apiParam   {Date}           spt                【必须】采样时间(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiParam   {Double}         erljw              二氯甲烷
     * @apiParam   {Double}         sljw               三氯甲烷
     * @apiParam   {Double}         silht              四氯化碳
     * @apiParam   {Double}         sxjw               三溴甲烷
     * @apiParam   {Double}         erlyw12            1，2二氯乙烷
     * @apiParam   {Double}         hylbw              环氧氯丙烷
     * @apiParam   {Double}         hyql               环氧七氯
     * @apiParam   {Double}         lyx                氯乙烯
     * @apiParam   {Double}         erlyx11            1，1二氯乙烯
     * @apiParam   {Double}         erlyx12            1，2二氯乙烯
     * @apiParam   {Double}         slyx               三氯乙烯
     * @apiParam   {Double}         silyx              四氯乙烯
     * @apiParam   {Double}         lderx              氯丁二烯
     * @apiParam   {Double}         llderx             六氯丁二烯
     * @apiParam   {Double}         jq                 甲醛
     * @apiParam   {Double}         yq                 乙醛
     * @apiParam   {Double}         slyq               三氯乙醛
     * @apiParam   {Double}         bxq                丙烯醛
     * @apiParam   {Double}         bxxan              丙烯酰胺
     * @apiParam   {Double}         bxqi               丙烯腈
     * @apiParam   {String}         nt                 备注
     * @apiParam   {String}         speRegData         特殊区域
     * @apiParam   {Date}           ts                 时间戳(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiParam   {Date}           testComTm          化验完成时间(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiSuccess {Integer}        status             1:新增成功;0:新增失败.
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据,通常包含新增数据的主键值
     * @apiSampleRequest wq/aaacp/d/insertBatch
     * @apiSuccessExample 新增成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":{
     *   "stcd": null,
     *   "spt": null,
     *   "prpnm": null,
     *   "lynm": null,
     *   "wbtp": null
     *      }
     *   }
     * }
     @apiSuccessExample 新增失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":{
     *   "stcd": null,
     *   "spt": null,
     *   "prpnm": null,
     *   "lynm": null,
     *   "wbtp": null
     *      }
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * [{
     * "stcd": null,
     * "prpnm": null,
     * "lynm": null,
     * "wbtp": null,
     * "spt": null,
     * "erljw": null,
     * "sljw": null,
     * "silht": null,
     * "sxjw": null,
     * "erlyw12": null,
     * "hylbw": null,
     * "hyql": null,
     * "lyx": null,
     * "erlyx11": null,
     * "erlyx12": null,
     * "slyx": null,
     * "silyx": null,
     * "lderx": null,
     * "llderx": null,
     * "jq": null,
     * "yq": null,
     * "slyq": null,
     * "bxq": null,
     * "bxxan": null,
     * "bxqi": null,
     * "nt": null,
     * "speRegData": null,
     * "ts": null,
     * "testComTm": null
     * }]
     * @apiUse exceptions
     */
    @POST
    @Path("insertBatch")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response insertBatch(List<WqAaacpD> recordList) {
        LOGGER.info("批量新增 测站卤代烷醛胺类有机物项目数据表,参数 WqAaacpD:[]", recordList);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.insert(wqAaacpDService.insertBatch(recordList),recordList))).build();
    }

    /**
     * @api {put} wq/aaacp/d/{stcd:\\w{8}}/{spt}/{prpnm:\\w{1}}/{lynm:\\w{1}}/{wbtp:\\w{1}}/update [U][G]根据主键修改
     * @apiPrivate
     * @apiDescription [G]根据主键修改WQ_AAACP_D(测站卤代烷醛胺类有机物项目数据表)数据
     * @apiName (generate)update data
     * @apiGroup WQ_AAACP_D-测站卤代烷醛胺类有机物项目数据表
     * @apiVersion 1.0.0
     * @apiParam   {String}         stcd               【必须】测站编码
     * @apiParam   {String}         prpnm              【必须】垂线编号
     * @apiParam   {String}         lynm               【必须】层面编号
     * @apiParam   {String}         wbtp               【必须】水体类型
     * @apiParam   {Date}           spt                【必须】采样时间
     * @apiParam   {Double}         erljw              二氯甲烷
     * @apiParam   {Double}         sljw               三氯甲烷
     * @apiParam   {Double}         silht              四氯化碳
     * @apiParam   {Double}         sxjw               三溴甲烷
     * @apiParam   {Double}         erlyw12            1，2二氯乙烷
     * @apiParam   {Double}         hylbw              环氧氯丙烷
     * @apiParam   {Double}         hyql               环氧七氯
     * @apiParam   {Double}         lyx                氯乙烯
     * @apiParam   {Double}         erlyx11            1，1二氯乙烯
     * @apiParam   {Double}         erlyx12            1，2二氯乙烯
     * @apiParam   {Double}         slyx               三氯乙烯
     * @apiParam   {Double}         silyx              四氯乙烯
     * @apiParam   {Double}         lderx              氯丁二烯
     * @apiParam   {Double}         llderx             六氯丁二烯
     * @apiParam   {Double}         jq                 甲醛
     * @apiParam   {Double}         yq                 乙醛
     * @apiParam   {Double}         slyq               三氯乙醛
     * @apiParam   {Double}         bxq                丙烯醛
     * @apiParam   {Double}         bxxan              丙烯酰胺
     * @apiParam   {Double}         bxqi               丙烯腈
     * @apiParam   {String}         nt                 备注
     * @apiParam   {String}         speRegData         特殊区域
     * @apiParam   {Date}           ts                 【必须】时间戳
     * @apiParam   {Date}           testComTm          化验完成时间
     * @apiSuccess {Integer}        status             1:修改成功;0:要修改的数据不存在(可能已被删除)
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSampleRequest wq/aaacp/d/{stcd}/{spt}/{prpnm}/{lynm}/{wbtp}/update
     * @apiSuccessExample 修改成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 修改失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * {
     * "stcd": null,
     * "prpnm": null,
     * "lynm": null,
     * "wbtp": null,
     * "spt": null,
     * "erljw": null,
     * "sljw": null,
     * "silht": null,
     * "sxjw": null,
     * "erlyw12": null,
     * "hylbw": null,
     * "hyql": null,
     * "lyx": null,
     * "erlyx11": null,
     * "erlyx12": null,
     * "slyx": null,
     * "silyx": null,
     * "lderx": null,
     * "llderx": null,
     * "jq": null,
     * "yq": null,
     * "slyq": null,
     * "bxq": null,
     * "bxxan": null,
     * "bxqi": null,
     * "nt": null,
     * "speRegData": null,
     * "ts": null,
     * "testComTm": null
     * }
     * @apiUse exceptions
     */
    @PUT
    @Path("{stcd:\\w{8}}/{spt}/{prpnm:\\w{1}}/{lynm:\\w{1}}/{wbtp:\\w{1}}/update")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response update(@PathParam("stcd") String stcd,@PathParam("spt") String spt,@PathParam("prpnm") String prpnm,@PathParam("lynm") String lynm,@PathParam("wbtp") String wbtp, WqAaacpD record) {
        record.setStcd(stcd);
        LocalDateTime.parse(spt,LocalDateTimeUtil.DATE_TIME_FORMATTER_YMD_HMS);
        record.setPrpnm(prpnm);
        record.setLynm(lynm);
        record.setWbtp(wbtp);
        LOGGER.info("根据主键修改 测站卤代烷醛胺类有机物项目数据表,参数 WqAaacpD:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.update(wqAaacpDService.updateByPrimaryKey(record)))).build();
    }

    /**
     * @api {put} wq/aaacp/d/{stcd:\\w{8}}/{spt}/{prpnm:\\w{1}}/{lynm:\\w{1}}/{wbtp:\\w{1}}/update-selective [U][G]根据主键修改(只修改非null字段)
     * @apiPrivate
     * @apiDescription [G]根据主键修改WQ_AAACP_D(测站卤代烷醛胺类有机物项目数据表)数据,只修改非null字段
     * @apiName (generate)update selected data
     * @apiGroup WQ_AAACP_D-测站卤代烷醛胺类有机物项目数据表
     * @apiVersion 1.0.0
     * @apiParam   {String}         stcd               测站编码
     * @apiParam   {String}         prpnm              垂线编号
     * @apiParam   {String}         lynm               层面编号
     * @apiParam   {String}         wbtp               水体类型
     * @apiParam   {Date}           spt                采样时间
     * @apiParam   {Double}         erljw              二氯甲烷
     * @apiParam   {Double}         sljw               三氯甲烷
     * @apiParam   {Double}         silht              四氯化碳
     * @apiParam   {Double}         sxjw               三溴甲烷
     * @apiParam   {Double}         erlyw12            1，2二氯乙烷
     * @apiParam   {Double}         hylbw              环氧氯丙烷
     * @apiParam   {Double}         hyql               环氧七氯
     * @apiParam   {Double}         lyx                氯乙烯
     * @apiParam   {Double}         erlyx11            1，1二氯乙烯
     * @apiParam   {Double}         erlyx12            1，2二氯乙烯
     * @apiParam   {Double}         slyx               三氯乙烯
     * @apiParam   {Double}         silyx              四氯乙烯
     * @apiParam   {Double}         lderx              氯丁二烯
     * @apiParam   {Double}         llderx             六氯丁二烯
     * @apiParam   {Double}         jq                 甲醛
     * @apiParam   {Double}         yq                 乙醛
     * @apiParam   {Double}         slyq               三氯乙醛
     * @apiParam   {Double}         bxq                丙烯醛
     * @apiParam   {Double}         bxxan              丙烯酰胺
     * @apiParam   {Double}         bxqi               丙烯腈
     * @apiParam   {String}         nt                 备注
     * @apiParam   {String}         speRegData         特殊区域
     * @apiParam   {Date}           ts                 时间戳
     * @apiParam   {Date}           testComTm          化验完成时间
     * @apiSuccess {Integer}        status             1:修改成功;0:要修改的数据不存在(可能已被删除)
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSampleRequest wq/aaacp/d/{stcd}/{spt}/{prpnm}/{lynm}/{wbtp}/update-selective
     * * @apiSuccessExample 修改成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 修改失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * {
     * "stcd": null,
     * "prpnm": null,
     * "lynm": null,
     * "wbtp": null,
     * "spt": null,
     * "erljw": null,
     * "sljw": null,
     * "silht": null,
     * "sxjw": null,
     * "erlyw12": null,
     * "hylbw": null,
     * "hyql": null,
     * "lyx": null,
     * "erlyx11": null,
     * "erlyx12": null,
     * "slyx": null,
     * "silyx": null,
     * "lderx": null,
     * "llderx": null,
     * "jq": null,
     * "yq": null,
     * "slyq": null,
     * "bxq": null,
     * "bxxan": null,
     * "bxqi": null,
     * "nt": null,
     * "speRegData": null,
     * "ts": null,
     * "testComTm": null
     * }
     * @apiUse exceptions
     */
    @PUT
    @Path("{stcd:\\w{8}}/{spt}/{prpnm:\\w{1}}/{lynm:\\w{1}}/{wbtp:\\w{1}}/update-selective")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response updateSelective(@PathParam("stcd") String stcd,@PathParam("spt") String spt,@PathParam("prpnm") String prpnm,@PathParam("lynm") String lynm,@PathParam("wbtp") String wbtp, WqAaacpD record) {
        record.setStcd(stcd);
        LocalDateTime.parse(spt,LocalDateTimeUtil.DATE_TIME_FORMATTER_YMD_HMS);
        record.setPrpnm(prpnm);
        record.setLynm(lynm);
        record.setWbtp(wbtp);
        LOGGER.info("根据主键修改(只修改非null字段) 测站卤代烷醛胺类有机物项目数据表,参数 WqAaacpD:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.update(wqAaacpDService.updateByPrimaryKeySelective(record)))).build();
    }

    /**
     * @api {post} wq/aaacp/d/updateBatch [U][G]根据主键批量修改(只修改非null字段)
     * @apiPrivate
     * @apiDescription [G]根据批量主键修改WQ_AAACP_D(测站卤代烷醛胺类有机物项目数据表)数据,只修改非null字段
     * @apiName (generate)updateBatch selected data
     * @apiGroup WQ_AAACP_D-测站卤代烷醛胺类有机物项目数据表
     * @apiVersion 1.0.0
     * @apiParam   {String}         stcd               测站编码
     * @apiParam   {String}         prpnm              垂线编号
     * @apiParam   {String}         lynm               层面编号
     * @apiParam   {String}         wbtp               水体类型
     * @apiParam   {Date}           spt                采样时间
     * @apiParam   {Double}         erljw              二氯甲烷
     * @apiParam   {Double}         sljw               三氯甲烷
     * @apiParam   {Double}         silht              四氯化碳
     * @apiParam   {Double}         sxjw               三溴甲烷
     * @apiParam   {Double}         erlyw12            1，2二氯乙烷
     * @apiParam   {Double}         hylbw              环氧氯丙烷
     * @apiParam   {Double}         hyql               环氧七氯
     * @apiParam   {Double}         lyx                氯乙烯
     * @apiParam   {Double}         erlyx11            1，1二氯乙烯
     * @apiParam   {Double}         erlyx12            1，2二氯乙烯
     * @apiParam   {Double}         slyx               三氯乙烯
     * @apiParam   {Double}         silyx              四氯乙烯
     * @apiParam   {Double}         lderx              氯丁二烯
     * @apiParam   {Double}         llderx             六氯丁二烯
     * @apiParam   {Double}         jq                 甲醛
     * @apiParam   {Double}         yq                 乙醛
     * @apiParam   {Double}         slyq               三氯乙醛
     * @apiParam   {Double}         bxq                丙烯醛
     * @apiParam   {Double}         bxxan              丙烯酰胺
     * @apiParam   {Double}         bxqi               丙烯腈
     * @apiParam   {String}         nt                 备注
     * @apiParam   {String}         speRegData         特殊区域
     * @apiParam   {Date}           ts                 时间戳
     * @apiParam   {Date}           testComTm          化验完成时间
     * @apiSuccess {Integer}        status             1:修改成功;0:要修改的数据不存在(可能已被删除)
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSampleRequest  wq/aaacp/d/updateBatch
     * * @apiSuccessExample 修改成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 修改失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * [{
     * "stcd": null,
     * "prpnm": null,
     * "lynm": null,
     * "wbtp": null,
     * "spt": null,
     * "erljw": null,
     * "sljw": null,
     * "silht": null,
     * "sxjw": null,
     * "erlyw12": null,
     * "hylbw": null,
     * "hyql": null,
     * "lyx": null,
     * "erlyx11": null,
     * "erlyx12": null,
     * "slyx": null,
     * "silyx": null,
     * "lderx": null,
     * "llderx": null,
     * "jq": null,
     * "yq": null,
     * "slyq": null,
     * "bxq": null,
     * "bxxan": null,
     * "bxqi": null,
     * "nt": null,
     * "speRegData": null,
     * "ts": null,
     * "testComTm": null
     * }]
     * @apiUse exceptions
     */
    @POST
    @Path("updateBatch")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response updateBatch(List<WqAaacpD> record) {
        LOGGER.info("根据主键批量修改(只修改非null字段) 测站卤代烷醛胺类有机物项目数据表,参数 WqAaacpD:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.update(wqAaacpDService.updateBatch(record)))).build();
    }

    /**
     * @api {delete} wq/aaacp/d/{stcd:\\w{8}}/{spt}/{prpnm:\\w{1}}/{lynm:\\w{1}}/{wbtp:\\w{1}} [D][G]根据主键删除
     * @apiPrivate
     * @apiDescription [G]根据主键删除WQ_AAACP_D(测站卤代烷醛胺类有机物项目数据表)数据
     * @apiName (generate)delete by primary key
     * @apiGroup WQ_AAACP_D-测站卤代烷醛胺类有机物项目数据表
     * @apiVersion 1.0.0
     * @apiSampleRequest wq/aaacp/d/{stcd}/{spt}/{prpnm}/{lynm}/{wbtp}
     * @apiParam   {String}         stcd               【必须】测站编码
     * @apiParam   {Date}           spt                【必须】采样时间
     * @apiParam   {String}         prpnm              【必须】垂线编号
     * @apiParam   {String}         lynm               【必须】层面编号
     * @apiParam   {String}         wbtp               【必须】水体类型
     * @apiSuccess {Integer}        status             1:删除成功;0:要删除的数据不存在(可能已被删除).
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSuccessExample 删除成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 删除失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiUse exceptions
     */
    @DELETE
    @Path("{stcd:\\w{8}}/{spt}/{prpnm:\\w{1}}/{lynm:\\w{1}}/{wbtp:\\w{1}}")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response delete(@PathParam("stcd") String stcd,@PathParam("spt") String spt,@PathParam("prpnm") String prpnm,@PathParam("lynm") String lynm,@PathParam("wbtp") String wbtp) {
         WqAaacpDKey pk = new WqAaacpDKey();
        pk.setStcd(stcd);
        LocalDateTime.parse(spt,LocalDateTimeUtil.DATE_TIME_FORMATTER_YMD_HMS);
        pk.setPrpnm(prpnm);
        pk.setLynm(lynm);
        pk.setWbtp(wbtp);
        LOGGER.info("根据主键删除 测站卤代烷醛胺类有机物项目数据表,参数 pk:{}", pk);
        Integer rows = wqAaacpDService.deleteByPrimaryKey(pk);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.delete(rows))).build();
    }

    /**
     * @api {delete} wq/aaacp/d/by-filter [D][G]根据条件删除
     * @apiPrivate
     * @apiDescription [G]根据条件删除WQ_AAACP_D(测站卤代烷醛胺类有机物项目数据表)数据
     * @apiName (generate)delete by filter
     * @apiGroup WQ_AAACP_D-测站卤代烷醛胺类有机物项目数据表
     * @apiVersion 1.0.0
     * @apiSampleRequest wq/aaacp/d/by-filter
     * @apiParam   {String}         stcd               测站编码
     * @apiParam   {List(String)}   prpnmList          (数组)垂线编号
     * @apiParam   {List(String)}   lynmList           (数组)层面编号
     * @apiParam   {List(String)}   wbtpList           (数组)水体类型
     * @apiParam   {Date}           sptBgTm            (开始时间)采样时间
     * @apiParam   {Date}           sptEdTm            (结束时间)采样时间
     * @apiParam   {Double}         erljwMin           (最小)二氯甲烷
     * @apiParam   {Double}         erljwMax           (最大)二氯甲烷
     * @apiParam   {Double}         sljwMin            (最小)三氯甲烷
     * @apiParam   {Double}         sljwMax            (最大)三氯甲烷
     * @apiParam   {Double}         silhtMin           (最小)四氯化碳
     * @apiParam   {Double}         silhtMax           (最大)四氯化碳
     * @apiParam   {Double}         sxjwMin            (最小)三溴甲烷
     * @apiParam   {Double}         sxjwMax            (最大)三溴甲烷
     * @apiParam   {Double}         erlyw12Min         (最小)1，2二氯乙烷
     * @apiParam   {Double}         erlyw12Max         (最大)1，2二氯乙烷
     * @apiParam   {Double}         hylbwMin           (最小)环氧氯丙烷
     * @apiParam   {Double}         hylbwMax           (最大)环氧氯丙烷
     * @apiParam   {Double}         hyqlMin            (最小)环氧七氯
     * @apiParam   {Double}         hyqlMax            (最大)环氧七氯
     * @apiParam   {Double}         lyxMin             (最小)氯乙烯
     * @apiParam   {Double}         lyxMax             (最大)氯乙烯
     * @apiParam   {Double}         erlyx11Min         (最小)1，1二氯乙烯
     * @apiParam   {Double}         erlyx11Max         (最大)1，1二氯乙烯
     * @apiParam   {Double}         erlyx12Min         (最小)1，2二氯乙烯
     * @apiParam   {Double}         erlyx12Max         (最大)1，2二氯乙烯
     * @apiParam   {Double}         slyxMin            (最小)三氯乙烯
     * @apiParam   {Double}         slyxMax            (最大)三氯乙烯
     * @apiParam   {Double}         silyxMin           (最小)四氯乙烯
     * @apiParam   {Double}         silyxMax           (最大)四氯乙烯
     * @apiParam   {Double}         lderxMin           (最小)氯丁二烯
     * @apiParam   {Double}         lderxMax           (最大)氯丁二烯
     * @apiParam   {Double}         llderxMin          (最小)六氯丁二烯
     * @apiParam   {Double}         llderxMax          (最大)六氯丁二烯
     * @apiParam   {Double}         jqMin              (最小)甲醛
     * @apiParam   {Double}         jqMax              (最大)甲醛
     * @apiParam   {Double}         yqMin              (最小)乙醛
     * @apiParam   {Double}         yqMax              (最大)乙醛
     * @apiParam   {Double}         slyqMin            (最小)三氯乙醛
     * @apiParam   {Double}         slyqMax            (最大)三氯乙醛
     * @apiParam   {Double}         bxqMin             (最小)丙烯醛
     * @apiParam   {Double}         bxqMax             (最大)丙烯醛
     * @apiParam   {Double}         bxxanMin           (最小)丙烯酰胺
     * @apiParam   {Double}         bxxanMax           (最大)丙烯酰胺
     * @apiParam   {Double}         bxqiMin            (最小)丙烯腈
     * @apiParam   {Double}         bxqiMax            (最大)丙烯腈
     * @apiParam   {String}         nt                 备注
     * @apiParam   {List(String)}   speRegDataList     (数组)特殊区域
     * @apiParam   {Date}           tsBgTm             (开始时间)时间戳
     * @apiParam   {Date}           tsEdTm             (结束时间)时间戳
     * @apiParam   {Date}           testComTmBgTm      (开始时间)化验完成时间
     * @apiParam   {Date}           testComTmEdTm      (结束时间)化验完成时间
     * @apiSuccess {Integer}        status             通常1或者>1:删除成功;0:没有符合条件的数据.
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSuccessExample 删除成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 删除失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiUse exceptions
     */
    @DELETE
    @Path("by-filter")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response deleteByFilter(WqAaacpDQo filter) {
        LOGGER.info("根据条件删除 测站卤代烷醛胺类有机物项目数据表,参数 WqAaacpDQo:{}", filter);
        Integer rows = wqAaacpDService.deleteByFilter(filter);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.delete(rows))).build();
    }
}
